-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1/internal: refactor GetComposeStatus
improve error handling
#1324
v1/internal: refactor GetComposeStatus
improve error handling
#1324
Conversation
3e9f6ca
to
1f37e93
Compare
Codecov ReportAttention: Patch coverage is
|
1f37e93
to
17e1d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this makes the functions smaller and more readable
it duplicates the number of requests (calling h.getComposeByIdAndOrgId(ctx, composeId)
twice now)?
If I'm right - this should be optimized to avoid duplicating the number of external requests
17e1d2c
to
2c6fd00
Compare
2c6fd00
to
7079a25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'm not familiar with the image-builder codebase so please take my review with a grain of salt. I have some suggestions inline about structure and naming though that are maybe/hopefully helpful :)
7079a25
to
3852b9e
Compare
ab51f06
to
9b4a036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and sorry that it took me so long to look at this! This looks nice, some tiny naming/code organisation suggestions inline for your consideration.
8e3471f
to
f55a3b2
Compare
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
f55a3b2
to
1c4f770
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this refactor, I have two small suggestions inline, but if you prefer we could also do them as a followup (but I included a suggested diff so maybe/hopefully it's not much trouble).
7aa99c1
to
a566c2e
Compare
a566c2e
to
d80a189
Compare
d80a189
to
d2b1746
Compare
d2b1746
to
36cf450
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, thank you! One tiny comment left but everything else looks very nice now
36cf450
to
a69f564
Compare
a69f564
to
ac51eb4
Compare
…ode structure this commit improve error handling and code structure * Split GetComposeStatus into smaller, more focused functions * Enhance error handling with more specific HTTP status codes *Add dedicated functions for handling different response scenarios * Implement parseAndRedactComposeRequest for better separation of concerns * Improve code readability and maintainability
ac51eb4
to
07153ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
this commit improve error handling and code structure